package com.ruoyi.goods.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.math3.stat.descriptive.summary.Product;

/**
 * 商品抢兑对象 preempt
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("preempt")
public class Preempt extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 抢占记录唯一标识符，自增 */
    @TableId
    private Long id;

    /** 抢占的时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "抢占的时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "抢占的时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endtime;

    /** 关联的商品 ID */
    @Excel(name = "关联的商品 ID")
    private Long productId;

    /** 商品价格 */
    @Excel(name = "商品价格")
    private Long price;

    /** 抢占库存，必须大于等于0 */
    @Excel(name = "抢占库存，必须大于等于0")
    private Long stock;

    /** 逻辑删除标识，默认不删除 */
    @Excel(name = "逻辑删除标识，默认不删除")
    private Integer isDeleted;

    @TableField(value = "products")
    private Products products;
    @TableField(value = "sales")
    private  Sales  sales;
}
